<template>
  <div class="app">
    <Editor v-model="state"/>
    <!--  ↕等价  -->
    <!--<Editor :modelValue="state" @update:modelValue="xxx"/>-->
  </div>
</template>

<script>
import {ref,provide} from "vue";

import data from './data.json';
import Editor from './packages/editor';
import {registerConfig as config} from "./editor-config";

export default {
  name: 'App',
  components: {Editor},
  setup(){
    const state = ref(data);

    provide('config', config);

    return {
      state
    }
  }
}
</script>

<style lang="scss">
body {
  margin: 0;
}
.app {
  position: fixed;
  top: 20px;
  left: 20px;
  right: 20px;
  bottom: 20px;
}
</style>
